package com.nuanshui.heatedloan.dal.module;

import org.apache.commons.lang.StringUtils;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.annotation.JSONField;
import com.nuanshui.heatedloan.dal.BaseEntityImpl;
import com.nuanshui.heatedloan.dal.vo.BannerVO;


/**
 * 首页菜单
 * @ClassName: IndexMenu 
 * @author guohao
 * @date 2015年7月6日 上午11:30:36 
 *
 */

public class IndexMenu  extends BaseEntityImpl{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String name;//菜单名称
	@JSONField(serialize=false)
	private Integer type;//菜单类型(1表示系统菜单)
	private  String url; // 菜单下内容需要访问的url
	@JSONField(serialize=false)
	private String extParam;//扩展参数
	@JSONField(serialize=false)
	private String itemIds;//要查询的对象id
	@JSONField(serialize=false)
	private String itemNames;
	@JSONField(serialize=false)
	private Integer orderNum;
	private Integer typeNum; //菜单展示类型
	
	private String des;
	
	private Integer systemMenu;//是否是系统 内置
	
	private Integer selected;
	private Integer moduleId;
	private  BannerVO banner; //菜单下banner
	@JSONField(serialize=false)
	private  Integer bannerDisplayType;
	

	public Integer getBannerDisplayType() {
		return bannerDisplayType;
	}

	public void setBannerDisplayType(Integer bannerDisplayType) {
		this.bannerDisplayType = bannerDisplayType;
	}

	public BannerVO getBanner() {
		return banner;
	}

	public void setBanner(BannerVO banner) {
		this.banner = banner;
	}

	public String getDes() {
		return des;
	}

	public void setDes(String des) {
		this.des = des;
	}

	public Integer getTypeNum() {
		return typeNum;
	}

	public void setTypeNum(Integer typeNum) {
		this.typeNum = typeNum;
	}

	public Boolean getSystemMenu() {
		if(systemMenu == null || systemMenu == 0) return false;
		return true;
	}

	public void setSystemMenu(Integer systemMenu) {
		this.systemMenu = systemMenu;
	}

	public boolean getSelected() {
		if(selected == null || selected == 0) return false;
		return true;
	}

	public void setSelected(Integer selected) {
		this.selected = selected;
	}

	public Integer getOrderNum() {
		return orderNum;
	}

	public void setOrderNum(Integer orderNum) {
		this.orderNum = orderNum;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getItemNames() {
		return itemNames;
	}

	public void setItemNames(String itemNames) {
		this.itemNames = itemNames;
	}




	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	

	public String getExtParam() {
		return extParam;
	}

	public void setExtParam(String extParam) {
		this.extParam = extParam;
	}

	public String getItemIds() {
		return itemIds;
	}

	public void setItemIds(String itemIds) {
		this.itemIds = itemIds;
	}
	
	public Object getExtendObj()
	{
		if(StringUtils.isNotEmpty(this.getExtParam()))
		{
			JSONObject obj=JSON.parseObject(this.getExtParam(),JSONObject.class);
			return obj;
		}
		
		return null;
	}

	public Integer getModuleId() {
		return moduleId;
	}

	public void setModuleId(Integer moduleId) {
		this.moduleId = moduleId;
	}
	
}
